package com.xxx.mapper;

import com.alibaba.fastjson.JSONObject;
import com.xxx.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/8/13 14:42
 * @Copyright 博为峰
 */
public interface UserParamMapper {
    //1.单个参数
    public User queryUserById(int id);

    //2.多个参数
    public User queryUserByIdName(int id, String name);

    //3.多个参数,使用@Param注解指定映射文件中的参数名称
    public User queryUserByIdNameAnno(@Param("id") int id, @Param("name") String name);

    //4.Map
    public User queryUserByIdNameMap(Map map);

    //4.List(list) Array(array)
    public List<User> queryUserByIdNameList(List<Integer> list);

    //5.json
    public List<User> queryUserByIdNameJson(JSONObject jsonObject);
}
